/*
 * IWantToBuyModel.java
 * business
 *
 * Created by chentao on 2017/5/15.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.data.model;

import com.yidiandao.business.data.WantToBuyEntity;
import com.yidiandao.business.data.bean.Goods;
import com.yidiandao.business.ui.widget.listview.DisplayListItem;

import java.util.List;

/**
 * 求购Model
 * <p>
 * Created by ChenTao(chentao7v@gmail.com) on 2017/5/15 0015 9:17
 */
public interface IWantToBuyModel {

    interface OnNetListener<T> {

        void onSuccess(T t);

        void onFailed(String message);
    }

    interface OnWantToBuyDetailListener {

        void onHeader(WantToBuyEntity entity);

        void onFailed();
    }

    interface OnOfferListListener {

        void onSuccess(List<DisplayListItem> listItems, boolean emptyData, boolean hasMoreData);

        void onFailed();
    }

    void submitOffer(String tag, String wantId, String price, String shippingFee, String mobile, OnNetListener<Object> listener);

    void getWantToBuyDetail(String wantId, String tag, OnWantToBuyDetailListener listener);

    void getWantToBuyOfferList(boolean isRefreshing, List<Goods> similarGoodsList, String wantId, String tag, OnOfferListListener listener);

    void cancelOffer(String tag, String offerId, OnNetListener<Object> listener);

}
